package com.zhenhao.xsq.ui.activity.home.presenter;


import com.zhenhao.xsq.data.api.HttpAPIWrapper;
import com.zhenhao.xsq.ui.activity.home.IndexFragment;
import com.zhenhao.xsq.ui.activity.home.contract.IndexContract;

import java.util.Map;

import javax.inject.Inject;

import androidx.annotation.NonNull;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Action;
import io.reactivex.functions.Consumer;

/**
 * @author xlei
 * @Package com.example.rxdemo.ui.activity.home
 * @Description: presenter of IndexFragment
 * @date 2019/01/08 10:12:45
 */
public class IndexPresenter implements IndexContract.IndexContractPresenter {

    HttpAPIWrapper httpAPIWrapper;
    private final IndexContract.View mView;
    private CompositeDisposable mCompositeDisposable;
    private IndexFragment mFragment;

    @Inject
    public IndexPresenter(@NonNull HttpAPIWrapper httpAPIWrapper, @NonNull IndexContract.View
            view, IndexFragment fragment) {
        mView = view;
        this.httpAPIWrapper = httpAPIWrapper;
        mCompositeDisposable = new CompositeDisposable();
        this.mFragment = fragment;
    }

    @Override
    public void subscribe() {

    }

    @Override
    public void unsubscribe() {
        if (!mCompositeDisposable.isDisposed()) {
            mCompositeDisposable.dispose();
        }
    }

}